package wsz.controller;

import core.anno.*;
import wsz.pojo.User;
import wsz.service.UserService;

/**
 * @author wsz
 * @date 2021/10/28 15:06
 **/
@Controller
@RequestMapping(value = "user")
public class UserController {

    @Autowired
    private UserService userService;

    @Security(value = {"wsz"})
    @RequestMapping(value = "handle1", method = RequestMethod.GET)
    public User handle1(String userName) {
        return userService.getByUserName(userName);
    }

    @Security(value = {"001", "002"})
    @RequestMapping(value = "handle2", method = RequestMethod.GET)
    public User handle2(String userName) {
        return userService.getByUserName(userName);
    }
}
